<label class="switch modern-switch">
  <input type="checkbox">
  <span class="slider round"></span>
</label>

<style>
/* From Uiverse.io by WriestTavo - Tags: switch, 3d switch, cool switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 34px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
  transition: 0.4s;
}

.slider.round {
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 1);
  transition: 0.4s;
}

.switch input:checked + .slider:before {
  transform: translateX(26px);
  background-color: #81da8f;
}

.switch input:checked + .slider {
  background-color: #86d993;
}

.switch input:not(:checked) + .slider:before {
  background-color: #e66a6a;
}

.switch input:not(:checked) + .slider {
  background-color: #e57373;
}

/* WriestTavo */
</style>
